package com.authManager.commons.feignApi;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.authManager.commons.feignApi.hystric.SysRoleApiHystric;
import com.authManager.entity.SysRole;
import com.commons.base.model.AdminPage;
import com.commons.base.model.ResultData;

@FeignClient(value = "authManager-server", fallback = SysRoleApiHystric.class)
public interface SysRoleApi {
	static final String projectAaaApiBaseUrl = "/authManager-server/admin/sysRole";

	/**
	 * 添加【角色信息】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/saveSysRole", method = { RequestMethod.POST })
	public ResultData<Object> saveSysRole(@RequestParam(value = "name",required = false) String name,
			@RequestParam(value = "seq",required = false) Integer seq, @RequestParam(value = "description",required = false) String description,
			@RequestParam(value = "roleCode",required = false) String roleCode);

	/**
	 * 修改【角色信息】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/editSysRole", method = { RequestMethod.POST })
	public ResultData<Object> editSysRole(@RequestParam(value = "sysRoleId",required = true) Long sysRoleId,
			@RequestParam(value = "name",required = false) String name, @RequestParam(value = "seq",required = false) Integer seq,
			@RequestParam(value = "description",required = false) String description, @RequestParam(value = "roleCode",required = false) String roleCode);

	/**
	 * 删除【角色信息】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/delSysRole", method = { RequestMethod.POST })
	public ResultData<Object> delSysRole(@RequestParam(value = "sysRoleId",required = true) Long sysRoleId);

	/**
	 * 获取【角色信息】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/getSysRole", method = { RequestMethod.POST })
	public ResultData<SysRole> getSysRole(@RequestParam(value = "sysRoleId",required = true) Long sysRoleId);

	/**
	 * 列表【角色信息】
	 */
	@RequestMapping(value = projectAaaApiBaseUrl + "/listSysRole", method = { RequestMethod.POST })
	public ResultData<AdminPage<SysRole>> listSysRole(
			@RequestParam(value = "pageNum",defaultValue = "1", required = false) Integer pageNum,
			@RequestParam(value = "pageSize",defaultValue = "10", required = false) Integer pageSize,
			@RequestParam(value = "sysRoleId",required = false) Long sysRoleId, @RequestParam(value = "name",required = false) String name,
			@RequestParam(value = "seq",required = false) Integer seq, @RequestParam(value = "description",required = false) String description,
			@RequestParam(value = "roleCode",required = false) String roleCode, @RequestParam(value = "start_creater",required = false) String start_creater,
			@RequestParam(value = "end_creater",required = false) String end_creater);
}
